import request from '@/utils/request'
import request2 from '@/utils/request2'

// 查询所有审核通过的友链列表
export function getUserBlogInfo(createBy) {
  return request({
    url: "/follow/userInfo/" + createBy,
    method: 'get',
    headers: {
      isToken: true
    }
  });
}


// 查询所有审核通过的友链列表
export function follow(userId,isFollow) {
  return request({
    url: "/follow/" + userId + "/" + isFollow,
    method: 'post',
    headers: {
      isToken: true
    }
  });
}

// 共同好友
export function followCommons(userId) {
  return request({
    url: "/follow/followCommons/" + userId,
    method: 'get',
    headers: {
      isToken: true
    }
  });
}
//获取我的关注的文章
export function getFollowArticleList(query) {
  return request2({
    url: "/follow/articleList",
    method: 'get',
    headers: {
      isToken: true
    },
    params: query
  });
}
export function getPinYinAuto(query) {
  return request2({
    url: "/follow/getPinYinAuto?key="+query,
    method: 'get',
    headers: {
      isToken: true
    }
  });
}
